fix: instantiate Result with new in resultWrapper - #390
Open
achromik wants to merge 487 commits into
Open
Conversation
Fix Development
Fix Version bump
DX | 28-10-2024 | Release
…dle-empty-entries dx | 1675 handle empty entries
Development to staging
DX | 18-11-2024 | Release
* Include HTTP error codes in the findOne method * Added testcases
DX | 05-12-2024 | Release
DX | 05-12-2024 | Release
fix: added fix for updateasseturl for handling jrte within blocks
…estcases Updated error codes in testcases
…p-isomorphic-fetch-node-fetch dx 1415 drop isomorphic fetch and node fetch
- Add .catch() on response.json() in 200 and non-200 branches to handle body-read failures - Retry on socket/abort errors (terminated, UND_ERR_SOCKET, UND_ERR_ABORTED) via onError() - Treat fetch-level and body-read socket errors consistently; reject with actual error when not retrying - Add SDK engineering investigation doc for UND_ERR_SOCKET handling Made-with: Cursor
…-err-socket-422-errors fix: Handle connection drops (UND_ERR_SOCKET) and prevent process crash
DX | 23-03-2026 | Release dev -> stg
DX | 23-03-2026 | Release
Added skills and cursor rules
…ate-cursor-rules-skills docs: add AGENTS.md, skills, and Cursor rules entry
…-release-process DX-6158: new release process
Brings in SDK v3.27.0 changes: - fix: handle connection drops (UND_ERR_SOCKET/UND_ERR_ABORTED) with retry logic in request.js - refactor: remove unused variables (environment, api_key) from request.js - chore: version bump 3.26.4 → 3.27.0 - chore: dependency updates in package-lock.json - ci: update sca-scan.yml All comprehensive integration test files retained unchanged. Updated .talismanrc checksums for package-lock.json and request.js.
Adds tests covering the new UND_ERR_SOCKET / UND_ERR_ABORTED retry logic introduced in src/core/lib/request.js (v3.27.0). RetryLogic.test.js — Socket & Transport Error Handling: - RetryLogic_AuthError_FailsFast_NotSlowedByRetryDelay: timing proof that 4xx errors are never retried regardless of retryLimit/retryDelay - RetryLogic_CustomRetryCondition_InvokesOnError_WithDelayBetweenRetries: proves retryCondition → onError() wiring applies retry delays - RetryLogic_ZeroRetryLimit_NetworkFailure_RejectsWithoutWaiting: proves the retryLimit > 0 guard in the new socket-error path is enforced ErrorHandling.test.js — Transport Layer vs API Errors: - ErrorHandling_TransportError_HasNoAPIErrorCode: transport errors must not be wrapped with API error_code fields - ErrorHandling_APIError_StructureDistinctFromTransportError: proves the two error shapes remain distinguishable for app-level error routing - ErrorHandling_ZeroRetryLimit_TransportError_ErrorShapeUnchanged: proves retryLimit does not mutate the error object shape Also removes stale duplicate test/config.js entry from .talismanrc.
Addresses test failures caused by slow network responses and insufficient timeouts in CI environments. Timeout increases: - SyncAPI: 30000ms on 6 sync operation tests - LogicalOperators: 15000ms/20000ms on OR queries, 5000ms on performance tests - PerformanceBenchmarks: 30000ms on sequential throughput test - ConcurrentRequests: 20000ms on concurrent-filters test, 30000ms on sequential-vs-concurrent timing test - CustomParameters: 15000ms on complex combination test - AdvancedEdgeCases: 15000ms on large-skip test - ContentTypeOperations: 15000ms on filtered-count test - ModularBlocksHandling: 15000ms on block validation test - ExistsSearchOperators: 15000ms on exists+notExists combination test - NumericOperators: 5000ms threshold (up from 3000ms) Bug fixes: - ConcurrentRequests: replace Promise.all with Promise.allSettled on 50-concurrent-requests test; assert >=80% success rate instead of requiring 100% (ECONNRESET under high load is expected behavior) - asset-query.test.ts: pass error to done() in catch block so Jest reports the actual failure instead of swallowing it; add 15000ms timeout
Adds NESTED_GLOBAL_FIELD_UID environment variable support and a 671-line comprehensive test suite for nested global fields. test/config.js: - Added nested global field entry reading from NESTED_GLOBAL_FIELD_UID - Added fallback env var names for global fields (GLOBAL_FIELD_UID, SIMPLE/MEDIUM/COMPLEX_GLOBAL_FIELD_UID) for broader stack compatibility test/helpers/TestDataHelper.js: - Added getNestedGlobalFieldUID() accessor method test/integration/GlobalFieldsTests/NestedGlobalField.test.js (new): - 671-line test suite for nested global field resolution - Covers: 6-level deep nesting, child field access, projection with nested fields, reference resolution inside nested structures, array handling, and circular reference safety
Auto-fix trailing spaces and multi-space violations across all test files to pass the CI lint check. Also adds talisman_report to .gitignore and updates .talismanrc checksums for modified files.
…ensive-integration-tests feat: comprehensive integration test suite with 737 tests
…cy folders Moved test coverage from test/asset and test/entry into the integration test suite (AssetQuery, ImageTransformation, ErrorHandling, UtilityMethods). Deleted the now-redundant test/asset and test/entry directories.
chore: migrate asset/entry tests to integration suite and removelegacy test/asset and test/entry folders
DX | 01-06-2026 | Release
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Since 3.18.0 (taxonomy support release),
src/core/modules/result.jsexportsResultas an ES class — previously it exported a factory function (module.exports = function (object) { return new Result(object); }). However,resultWrapper()insrc/core/lib/utils.jsstill invokesResult(...)as a plain function in 5 places.Any success response going through
resultWrapper— e.g.Stack.ContentType(...).Entry(uid).fetch()without.toJSON()— throws:This is a regression introduced in 3.18.0 — versions <= 3.17.2 are unaffected.
Repro (offline, >= 3.24.0 where the SDK uses global fetch)
For 3.18.0–3.23.x the same failure reproduces with
node-fetchstubbed instead ofglobal.fetch(those versions use thenode-fetchdependency).Fix
Add the missing
newkeyword at the 5Result(...)call sites inresultWrapper().Verified by applying the equivalent change to the built
dist/node/contentstack.jsand re-running the repro above — the entry resolves correctly.